import request from '@/utils/request'
// 引入qs库，qs.stringify()可以将对象转成字符串形式，这是因为后台接口的要求，一般来说axios传入data对象即可
import qs from 'qs'
import Cookies from 'js-cookie'
export function check (username, password) {
    var data = { 
        username,
        password,
        } 
  data = qs.stringify(data)
  return request({
    url: '/user/check',
    method: 'post',
    data
  })
}

export function update () {
    let data = { 
        username, 
        password,
        email
    }
    data = qs.stringify(data)
    return request({
      url: '/user/update',
      method: 'post',
      data
    })
  }